<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>19.this和原型没有关系的</title>
</head>

<body>
</body>
<script>
  //this 永远指向调用它的属性的对象，和原型没关系
  let hd = {
    name: '后盾人'
  };
  let User = {
    name: '向军',
    show () {
      console.log(this.name);
    }
  }
  Object.setPrototypeOf(hd,User);
  // 设置原型后，this 仍然指向调用它的hd
  hd.show();// 后盾人
</script>

</html>